local CollectHandler = require("collect.Handler")
local ExcelMonster = require("excel.Monster")
local Obj = require("core.Obj")
local ObjCollect = require("core.ObjCollect")
local ShopHandler = require("shop.Handler")
local list = {}

function isMonsterSpCg(obj)
	return obj and obj.monster_id and ExcelMonster.monster[obj.monster_id].sp_cg[1]
end

local mm = {}
function doMonsterSpCg(human, monster)
	local cf = monster and monster.monster_id and ExcelMonster.monster[monster.monster_id].sp_cg
	if cf[1] == 1 then
		Obj.stop(monster)
		monster.collect_human_id = human.id
		monster.collect_human_uid = human.uid
		list[cf[2]] = list[cf[2]] or ObjCollect.create(cf[2])
		local collect = list[cf[2]]
		collect.can_not_destroy = true
		collect.scene_id = human.scene_id
		collect.x = human.x
		collect.y = human.y
		mm.objID = collect.id
		CollectHandler.CG_COLLECT_START(human, mm)
		return
	end
	if cf[1] == 2 then
		return ShopHandler.CG_SHOP_NPC_QUERY_sub(human, cf[2])
	end
	assert(nil, sp_cg)
end
